<?php
	header("Content-type:text/html;charset=utf-8");
	$id = $_POST["user"];
	$pwd = $_POST["password"];
	
	// 连接数据库
	$conn = mysql_connect("localhost","root","root");
	
	mysql_select_db("2012");
	
	$reslut = mysql_query("select * from Xiaomi where userId = $id AND userPwd = '$pwd'",$conn);
	if(mysql_num_rows($reslut) == 1){
		echo "成功";
	}else{
		echo "0";
	}
	mysql_close($conn);
?>